﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ninject.Modules;
using Scala.Data.Impl;
using Scala.Data;
using Scala.Data.Impl.Uow;
using Scala.Logic.Repositories;
using Scala.Data.Impl.Repo;

namespace Scala.IoC
{
    public class DataModule : NinjectModule
    {
        public override void Load()
        {
            Bind<ISessionProvider>().To<SessionProvider>().InSingletonScope();
            Bind<IConfigurator>().To<NhibernateConfigurator>().InSingletonScope();
            Bind<IUnitOfWorkFactory>().To<UnitOfWorkFactory>().InSingletonScope();
            Bind<IUnitOfWork>().To<UnitOfWork>();        
            Bind<IEventRepo>().To<EventsRepo>().InSingletonScope();
            Bind<IEventTypeRepo>().To<EventTypesRepo>().InSingletonScope();
        }
    }
}
